package com.ssyc.gsk_teacher_appraisal.adapter;

import android.content.Context;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ssyc.gsk_teacher_appraisal.R;
import com.ssyc.gsk_teacher_appraisal.bean.TabInfo;

import java.util.List;


/**
 * 成绩管理的适配器
 * Created by Administrator on 2018/6/28 0028.
 */

public class ScoreRvAdapter extends BaseQuickAdapter<TabInfo, BaseViewHolder> {
    private Context context;

    public ScoreRvAdapter(Context context, int layoutResId, @Nullable List<TabInfo> data) {
        super(layoutResId, data);
        this.context = context;
    }

    @Override
    protected void convert(BaseViewHolder helper, TabInfo item) {
        //考试名称
        TextView tvName = helper.getView(R.id.tv_name);
//        tvName.setText(item.getTAG());
        //考试时间
        TextView tvTime = helper.getView(R.id.tv_time);
//        tvTime.setText(item.getTIME());
        //查看详情按钮
        Button btDetails = helper.getView(R.id.bt_details);
        btDetails.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                //跳转
//
            }
        });
    }
}
